package com.chexiehui.jc.mvp.forum;

import com.chexiehui.jc.Constants;
import com.chexiehui.jc.base.BaseModel;
import com.chexiehui.jc.base.BaseView;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * @Description 我的爱车添加
 * @Auth SongJun
 * @Date 2020/05/21 00:18
 **/
public interface ForumDynamicPostCovenant {

    interface View extends BaseView {
        void onUploadImageSuccess(BaseModel<String> successResult);
        void onUploadImageFailure(BaseModel<Object> failureResult);
        void onAddPostSuccess(BaseModel<Object> successResult);
        void onAddPostFailure(BaseModel<Object> failureResult);
        String getPostTitle();
        String getPostContent();
        String getPostForum();
        String getPostPhotos();
        String getPostLat();
        String getPostLng();
        String getPostCity();
    }

    interface Stores {
        @FormUrlEncoded
        @POST(Constants.URL_ADD_POST)
        Observable<BaseModel<Object>> addPost(
                @Field("forumId") String forumId,
                @Field("title") String title,
                @Field("content") String content,
                @Field("lat") String lat,
                @Field("lon") String lon,
                @Field("city") String city,
                @Field("photos") String photos,
                @Field("type") String type
        );
    }

    interface Presenter {
        void uploadImage(String filePath);
        void addPost();
    }

}